package dvx.mp.ivisual.desktop.domain.invoices;

import java.io.Serializable;
import java.util.Calendar;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

import dvx.mp.ivisual.desktop.ui.model.IInvoice;

@Entity
@Table(name="ivm_movimientos"
	,uniqueConstraints={
		@UniqueConstraint(columnNames={"uuidcomprobante_movs"})})
public class Invoice implements Serializable, IInvoice {
	/***/
	private static final long serialVersionUID = 1L;
	
	private String uuid;
	private Calendar date;
	private String rfc;
	private String concepto;
	private Double monto;
	private Double iva;
	private Double total;
	private boolean income;
	
	public Invoice(){}

	public void setUUID(String uuid)	{
		this.uuid = uuid;
	}
	
	
	
	public void setDate(Calendar date) {
		this.date = date;
	}



	public void setRFC(String rfc) {
		this.rfc = rfc;
	}



	public void setConcepto(String concepto) {
		this.concepto = concepto;
	}



	public void setMonto(Double monto) {
		this.monto = monto;
	}



	public void setIVA(Double iva) {
		this.iva = iva;
	}



	public void setTotal(Double total) {
		this.total = total;
	}



	public void setIncome(Boolean isIncome)	{
		this.income = isIncome;
	}
	
	

	@Override
	@Column(name="uuidcomprobante_movs")
	public String getUUID() {
		return this.uuid;
	}
	@Override
	@Column(name="fecha_movs")
	public Calendar getDate() {
		return this.date;
	}
	@Override
	public String getRFC() {
		return this.rfc;
	}
	@Override
	@Column(name="conceptogral")
	public String getConcepto() {
		return this.concepto;
	}
	@Override
	@Column(name="monto_movs")
	public Double getMonto() {
		return this.monto;
	}
	@Override
	@Column(name="iva_movs")
	public Double getIVA() {
		return this.iva;
	}
	@Override
	@Column(name="total_movs")
	public Double getTotal() {
		return this.total;
	}
	@Override
	@Column(name="monto_movs")
	public Boolean isIncome() {
//		return !this.rfc.equals("AAFF740627BE8");
		return this.income;
	}
}
